const provinceList = [{
    "ProID": 19,
    "name": "广东省",
    "ProSort": 20,
    "ProRemark": "省份"
},{
    "CityID": 200,
    "name": "深圳市",
    "ProID": 19,
    "CitySort": 200
}, {
    "Id": 1736,
    "DisName": "罗湖区",
    "CityID": 200,
    "DisSort": null
}, {
    "Id": 1737,
    "DisName": "福田区",
    "CityID": 200,
    "DisSort": null
}, {
    "Id": 1738,
    "DisName": "南山区",
    "CityID": 200,
    "DisSort": null
}, {
    "Id": 1739,
    "DisName": "宝安区",
    "CityID": 200,
    "DisSort": null
}, {
    "Id": 1740,
    "DisName": "龙岗区",
    "CityID": 200,
    "DisSort": null
}, {
    "Id": 1741,
    "DisName": "盐田区",
    "CityID": 200,
    "DisSort": null
}]

// 地区处理
let getRegionList = (provinceId,cityId) => {
    let arr = [];

    // 省份处理
    arr.push(provinceList.map(item => {
        return {
            "value": item.ProID,
            "label": item.name
        }
    }))
    // 城市处理
    arr.push(cityList.filter(item => item.ProID == provinceId).map(item => {
        return {
            "value": item.CityID,
            "label": item.name
        }
    }))
    // 地区处理
    if (cityId == null) {
        arr.push(districtList.filter(item => item.CityID == arr[1][0].value).map(item => {
            return {
                "value": item.Id,
                "label": item.DisName
            }
        }))
    } else {
        arr.push(districtList.filter(item => item.CityID == cityId).map(item => {
            return {
                "value": item.Id,
                "label": item.DisName
            }
        }))
    }
    

    return arr;
};

export default getRegionList